// 全局变量
@use './variables' as var;

.avue-sidebar {
  width: var.$sidebar_width;
  height: 100%;
  user-select: none;
  position: relative;
  height: 100%;
  position: relative;
  background-color: var.$layout_bg_color;
  transition: width 0.2s;
  box-sizing: border-box;
  box-shadow: 2px 0 6px rgba(0, 21, 41, 0.35);
  border-right: var.$layout_border;
  .el-scrollbar__wrap {
    overflow: unset;
    box-sizing: border-box;
  }
  .el-scrollbar__bar {
    display: none !important;
  }

  .avue-menu {
    box-sizing: border-box;
    padding: 8px 16px;
    height: calc(100% - #{var.$top_height});
    overflow: scroll;
  }

  &--tip {
    width: 90%;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    position: absolute;
    top: 5px;
    left: 5%;
    color: #ccc;
    z-index: 2;
    text-align: center;
    font-size: 14px;
    background-color: rgba(0, 0, 0, 0.4);
  }
  .el-menu {
    display: flex;
    flex-direction: column;
    row-gap: 8px;
    i {
      margin-right: 5px;
    }
    i,
    span {
      color: #666;
    }
    &-item {
      width: 200px;
      height: 48px;
      border-radius: 4px;

      &:hover {
        background: linear-gradient(270deg, #f29346 0%, #f05466 100%);

        i,
        span {
          color: #fff;
        }
      }
      &.is-active {
        background: linear-gradient(270deg, #f29346 0%, #f05466 100%);

        i,
        span {
          color: #fff;
        }
      }
    }
  }
  .el-menu--collapse {
    .el-menu-item {
      width: 48px;
      height: 48px;
    }
    .el-menu-tooltip__trigger {
      padding: 0;
      display: flex;
      justify-content: center;
      align-items: center;
      border-radius: 4px;
      i {
        margin-right: 0;
      }
    }
  }
  .el-sub-menu__title {
    i {
      margin-right: 5px;
    }

    i,
    span {
      color: #666;
    }

    &:hover {
      background: transparent;

      i,
      span {
        color: #666;
      }
    }

    &.is-active {
      background: linear-gradient(270deg, #f29346 0%, #f05466 100%);
      border-radius: 4px;

      i,
      span {
        color: #666;
      }
    }
  }
}
